<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the MantisUserTable class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single MantisUserTable object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a MantisUserTableMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 *
	 * @package My QCubed Application
	 * @subpackage MetaControls
	 * @property-read MantisUserTable $MantisUserTable the actual MantisUserTable data class being edited
	 * @property QLabel $IdControl
	 * @property-read QLabel $IdLabel
	 * @property QTextBox $UsernameControl
	 * @property-read QLabel $UsernameLabel
	 * @property QTextBox $RealnameControl
	 * @property-read QLabel $RealnameLabel
	 * @property QTextBox $EmailControl
	 * @property-read QLabel $EmailLabel
	 * @property QTextBox $PasswordControl
	 * @property-read QLabel $PasswordLabel
	 * @property QIntegerTextBox $EnabledControl
	 * @property-read QLabel $EnabledLabel
	 * @property QIntegerTextBox $ProtectedControl
	 * @property-read QLabel $ProtectedLabel
	 * @property QIntegerTextBox $AccessLevelControl
	 * @property-read QLabel $AccessLevelLabel
	 * @property QIntegerTextBox $LoginCountControl
	 * @property-read QLabel $LoginCountLabel
	 * @property QIntegerTextBox $LostPasswordRequestCountControl
	 * @property-read QLabel $LostPasswordRequestCountLabel
	 * @property QIntegerTextBox $FailedLoginCountControl
	 * @property-read QLabel $FailedLoginCountLabel
	 * @property QTextBox $CookieStringControl
	 * @property-read QLabel $CookieStringLabel
	 * @property QIntegerTextBox $LastVisitControl
	 * @property-read QLabel $LastVisitLabel
	 * @property QIntegerTextBox $DateCreatedControl
	 * @property-read QLabel $DateCreatedLabel
	 * @property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * @property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class MantisUserTableMetaControlGen extends QBaseClass {
		// General Variables
		/**
		 * @var MantisUserTable objMantisUserTable
		 * @access protected
		 */
		protected $objMantisUserTable;
		/**
		 * @var QForm|QControl objParentObject
		 * @access protected
		 */
		protected $objParentObject;
		/**
		 * @var string strTitleVerb
		 * @access protected
		 */
		protected $strTitleVerb;
		/**
		 * @var boolean blnEditMode
		 * @access protected
		 */
		protected $blnEditMode;

		// Controls that allow the editing of MantisUserTable's individual data fields
		/**
		 * @var QLabel lblId
		 * @access protected
		 */
		protected $lblId;
		/**
		 * @var QTextBox txtUsername
		 * @access protected
		 */
		protected $txtUsername;
		/**
		 * @var QTextBox txtRealname
		 * @access protected
		 */
		protected $txtRealname;
		/**
		 * @var QTextBox txtEmail
		 * @access protected
		 */
		protected $txtEmail;
		/**
		 * @var QTextBox txtPassword
		 * @access protected
		 */
		protected $txtPassword;
		/**
		 * @var QIntegerTextBox txtEnabled
		 * @access protected
		 */
		protected $txtEnabled;
		/**
		 * @var QIntegerTextBox txtProtected
		 * @access protected
		 */
		protected $txtProtected;
		/**
		 * @var QIntegerTextBox txtAccessLevel
		 * @access protected
		 */
		protected $txtAccessLevel;
		/**
		 * @var QIntegerTextBox txtLoginCount
		 * @access protected
		 */
		protected $txtLoginCount;
		/**
		 * @var QIntegerTextBox txtLostPasswordRequestCount
		 * @access protected
		 */
		protected $txtLostPasswordRequestCount;
		/**
		 * @var QIntegerTextBox txtFailedLoginCount
		 * @access protected
		 */
		protected $txtFailedLoginCount;
		/**
		 * @var QTextBox txtCookieString
		 * @access protected
		 */
		protected $txtCookieString;
		/**
		 * @var QIntegerTextBox txtLastVisit
		 * @access protected
		 */
		protected $txtLastVisit;
		/**
		 * @var QIntegerTextBox txtDateCreated
		 * @access protected
		 */
		protected $txtDateCreated;

		// Controls that allow the viewing of MantisUserTable's individual data fields
		/**
		 * @var QLabel lblUsername
		 * @access protected
		 */
		protected $lblUsername;
		/**
		 * @var QLabel lblRealname
		 * @access protected
		 */
		protected $lblRealname;
		/**
		 * @var QLabel lblEmail
		 * @access protected
		 */
		protected $lblEmail;
		/**
		 * @var QLabel lblPassword
		 * @access protected
		 */
		protected $lblPassword;
		/**
		 * @var QLabel lblEnabled
		 * @access protected
		 */
		protected $lblEnabled;
		/**
		 * @var QLabel lblProtected
		 * @access protected
		 */
		protected $lblProtected;
		/**
		 * @var QLabel lblAccessLevel
		 * @access protected
		 */
		protected $lblAccessLevel;
		/**
		 * @var QLabel lblLoginCount
		 * @access protected
		 */
		protected $lblLoginCount;
		/**
		 * @var QLabel lblLostPasswordRequestCount
		 * @access protected
		 */
		protected $lblLostPasswordRequestCount;
		/**
		 * @var QLabel lblFailedLoginCount
		 * @access protected
		 */
		protected $lblFailedLoginCount;
		/**
		 * @var QLabel lblCookieString
		 * @access protected
		 */
		protected $lblCookieString;
		/**
		 * @var QLabel lblLastVisit
		 * @access protected
		 */
		protected $lblLastVisit;
		/**
		 * @var QLabel lblDateCreated
		 * @access protected
		 */
		protected $lblDateCreated;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * MantisUserTableMetaControl to edit a single MantisUserTable object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single MantisUserTable object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MantisUserTableMetaControl
		 * @param MantisUserTable $objMantisUserTable new or existing MantisUserTable object
		 */
		 public function __construct($objParentObject, MantisUserTable $objMantisUserTable) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this MantisUserTableMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked MantisUserTable object
			$this->objMantisUserTable = $objMantisUserTable;

			// Figure out if we're Editing or Creating New
			if ($this->objMantisUserTable->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to
		 * edit, or if we are also allowed to create a new one, etc.
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MantisUserTableMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing MantisUserTable object creation - defaults to CreateOrEdit
 		 * @return MantisUserTableMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objMantisUserTable = MantisUserTable::Load($intId);

				// MantisUserTable was found -- return it!
				if ($objMantisUserTable)
					return new MantisUserTableMetaControl($objParentObject, $objMantisUserTable);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a MantisUserTable object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new MantisUserTableMetaControl($objParentObject, new MantisUserTable());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MantisUserTableMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing MantisUserTable object creation - defaults to CreateOrEdit
		 * @return MantisUserTableMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return MantisUserTableMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this MantisUserTableMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing MantisUserTable object creation - defaults to CreateOrEdit
		 * @return MantisUserTableMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return MantisUserTableMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objMantisUserTable->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QTextBox txtUsername
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtUsername_Create($strControlId = null) {
			$this->txtUsername = new QTextBox($this->objParentObject, $strControlId);
			$this->txtUsername->Name = QApplication::Translate('Username');
			$this->txtUsername->Text = $this->objMantisUserTable->Username;
			$this->txtUsername->Required = true;
			$this->txtUsername->MaxLength = MantisUserTable::UsernameMaxLength;
			return $this->txtUsername;
		}

		/**
		 * Create and setup QLabel lblUsername
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblUsername_Create($strControlId = null) {
			$this->lblUsername = new QLabel($this->objParentObject, $strControlId);
			$this->lblUsername->Name = QApplication::Translate('Username');
			$this->lblUsername->Text = $this->objMantisUserTable->Username;
			$this->lblUsername->Required = true;
			return $this->lblUsername;
		}

		/**
		 * Create and setup QTextBox txtRealname
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtRealname_Create($strControlId = null) {
			$this->txtRealname = new QTextBox($this->objParentObject, $strControlId);
			$this->txtRealname->Name = QApplication::Translate('Realname');
			$this->txtRealname->Text = $this->objMantisUserTable->Realname;
			$this->txtRealname->Required = true;
			$this->txtRealname->MaxLength = MantisUserTable::RealnameMaxLength;
			return $this->txtRealname;
		}

		/**
		 * Create and setup QLabel lblRealname
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblRealname_Create($strControlId = null) {
			$this->lblRealname = new QLabel($this->objParentObject, $strControlId);
			$this->lblRealname->Name = QApplication::Translate('Realname');
			$this->lblRealname->Text = $this->objMantisUserTable->Realname;
			$this->lblRealname->Required = true;
			return $this->lblRealname;
		}

		/**
		 * Create and setup QTextBox txtEmail
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtEmail_Create($strControlId = null) {
			$this->txtEmail = new QTextBox($this->objParentObject, $strControlId);
			$this->txtEmail->Name = QApplication::Translate('Email');
			$this->txtEmail->Text = $this->objMantisUserTable->Email;
			$this->txtEmail->Required = true;
			$this->txtEmail->MaxLength = MantisUserTable::EmailMaxLength;
			return $this->txtEmail;
		}

		/**
		 * Create and setup QLabel lblEmail
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblEmail_Create($strControlId = null) {
			$this->lblEmail = new QLabel($this->objParentObject, $strControlId);
			$this->lblEmail->Name = QApplication::Translate('Email');
			$this->lblEmail->Text = $this->objMantisUserTable->Email;
			$this->lblEmail->Required = true;
			return $this->lblEmail;
		}

		/**
		 * Create and setup QTextBox txtPassword
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtPassword_Create($strControlId = null) {
			$this->txtPassword = new QTextBox($this->objParentObject, $strControlId);
			$this->txtPassword->Name = QApplication::Translate('Password');
			$this->txtPassword->Text = $this->objMantisUserTable->Password;
			$this->txtPassword->Required = true;
			$this->txtPassword->MaxLength = MantisUserTable::PasswordMaxLength;
			return $this->txtPassword;
		}

		/**
		 * Create and setup QLabel lblPassword
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblPassword_Create($strControlId = null) {
			$this->lblPassword = new QLabel($this->objParentObject, $strControlId);
			$this->lblPassword->Name = QApplication::Translate('Password');
			$this->lblPassword->Text = $this->objMantisUserTable->Password;
			$this->lblPassword->Required = true;
			return $this->lblPassword;
		}

		/**
		 * Create and setup QIntegerTextBox txtEnabled
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtEnabled_Create($strControlId = null) {
			$this->txtEnabled = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtEnabled->Name = QApplication::Translate('Enabled');
			$this->txtEnabled->Text = $this->objMantisUserTable->Enabled;
			$this->txtEnabled->Required = true;
			return $this->txtEnabled;
		}

		/**
		 * Create and setup QLabel lblEnabled
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblEnabled_Create($strControlId = null, $strFormat = null) {
			$this->lblEnabled = new QLabel($this->objParentObject, $strControlId);
			$this->lblEnabled->Name = QApplication::Translate('Enabled');
			$this->lblEnabled->Text = $this->objMantisUserTable->Enabled;
			$this->lblEnabled->Required = true;
			$this->lblEnabled->Format = $strFormat;
			return $this->lblEnabled;
		}

		/**
		 * Create and setup QIntegerTextBox txtProtected
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtProtected_Create($strControlId = null) {
			$this->txtProtected = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtProtected->Name = QApplication::Translate('Protected');
			$this->txtProtected->Text = $this->objMantisUserTable->Protected;
			$this->txtProtected->Required = true;
			return $this->txtProtected;
		}

		/**
		 * Create and setup QLabel lblProtected
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblProtected_Create($strControlId = null, $strFormat = null) {
			$this->lblProtected = new QLabel($this->objParentObject, $strControlId);
			$this->lblProtected->Name = QApplication::Translate('Protected');
			$this->lblProtected->Text = $this->objMantisUserTable->Protected;
			$this->lblProtected->Required = true;
			$this->lblProtected->Format = $strFormat;
			return $this->lblProtected;
		}

		/**
		 * Create and setup QIntegerTextBox txtAccessLevel
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtAccessLevel_Create($strControlId = null) {
			$this->txtAccessLevel = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtAccessLevel->Name = QApplication::Translate('Access Level');
			$this->txtAccessLevel->Text = $this->objMantisUserTable->AccessLevel;
			$this->txtAccessLevel->Required = true;
			return $this->txtAccessLevel;
		}

		/**
		 * Create and setup QLabel lblAccessLevel
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblAccessLevel_Create($strControlId = null, $strFormat = null) {
			$this->lblAccessLevel = new QLabel($this->objParentObject, $strControlId);
			$this->lblAccessLevel->Name = QApplication::Translate('Access Level');
			$this->lblAccessLevel->Text = $this->objMantisUserTable->AccessLevel;
			$this->lblAccessLevel->Required = true;
			$this->lblAccessLevel->Format = $strFormat;
			return $this->lblAccessLevel;
		}

		/**
		 * Create and setup QIntegerTextBox txtLoginCount
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtLoginCount_Create($strControlId = null) {
			$this->txtLoginCount = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtLoginCount->Name = QApplication::Translate('Login Count');
			$this->txtLoginCount->Text = $this->objMantisUserTable->LoginCount;
			$this->txtLoginCount->Required = true;
			return $this->txtLoginCount;
		}

		/**
		 * Create and setup QLabel lblLoginCount
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblLoginCount_Create($strControlId = null, $strFormat = null) {
			$this->lblLoginCount = new QLabel($this->objParentObject, $strControlId);
			$this->lblLoginCount->Name = QApplication::Translate('Login Count');
			$this->lblLoginCount->Text = $this->objMantisUserTable->LoginCount;
			$this->lblLoginCount->Required = true;
			$this->lblLoginCount->Format = $strFormat;
			return $this->lblLoginCount;
		}

		/**
		 * Create and setup QIntegerTextBox txtLostPasswordRequestCount
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtLostPasswordRequestCount_Create($strControlId = null) {
			$this->txtLostPasswordRequestCount = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtLostPasswordRequestCount->Name = QApplication::Translate('Lost Password Request Count');
			$this->txtLostPasswordRequestCount->Text = $this->objMantisUserTable->LostPasswordRequestCount;
			$this->txtLostPasswordRequestCount->Required = true;
			return $this->txtLostPasswordRequestCount;
		}

		/**
		 * Create and setup QLabel lblLostPasswordRequestCount
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblLostPasswordRequestCount_Create($strControlId = null, $strFormat = null) {
			$this->lblLostPasswordRequestCount = new QLabel($this->objParentObject, $strControlId);
			$this->lblLostPasswordRequestCount->Name = QApplication::Translate('Lost Password Request Count');
			$this->lblLostPasswordRequestCount->Text = $this->objMantisUserTable->LostPasswordRequestCount;
			$this->lblLostPasswordRequestCount->Required = true;
			$this->lblLostPasswordRequestCount->Format = $strFormat;
			return $this->lblLostPasswordRequestCount;
		}

		/**
		 * Create and setup QIntegerTextBox txtFailedLoginCount
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtFailedLoginCount_Create($strControlId = null) {
			$this->txtFailedLoginCount = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtFailedLoginCount->Name = QApplication::Translate('Failed Login Count');
			$this->txtFailedLoginCount->Text = $this->objMantisUserTable->FailedLoginCount;
			$this->txtFailedLoginCount->Required = true;
			return $this->txtFailedLoginCount;
		}

		/**
		 * Create and setup QLabel lblFailedLoginCount
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblFailedLoginCount_Create($strControlId = null, $strFormat = null) {
			$this->lblFailedLoginCount = new QLabel($this->objParentObject, $strControlId);
			$this->lblFailedLoginCount->Name = QApplication::Translate('Failed Login Count');
			$this->lblFailedLoginCount->Text = $this->objMantisUserTable->FailedLoginCount;
			$this->lblFailedLoginCount->Required = true;
			$this->lblFailedLoginCount->Format = $strFormat;
			return $this->lblFailedLoginCount;
		}

		/**
		 * Create and setup QTextBox txtCookieString
		 * @param string $strControlId optional ControlId to use
		 * @return QTextBox
		 */
		public function txtCookieString_Create($strControlId = null) {
			$this->txtCookieString = new QTextBox($this->objParentObject, $strControlId);
			$this->txtCookieString->Name = QApplication::Translate('Cookie String');
			$this->txtCookieString->Text = $this->objMantisUserTable->CookieString;
			$this->txtCookieString->Required = true;
			$this->txtCookieString->MaxLength = MantisUserTable::CookieStringMaxLength;
			return $this->txtCookieString;
		}

		/**
		 * Create and setup QLabel lblCookieString
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblCookieString_Create($strControlId = null) {
			$this->lblCookieString = new QLabel($this->objParentObject, $strControlId);
			$this->lblCookieString->Name = QApplication::Translate('Cookie String');
			$this->lblCookieString->Text = $this->objMantisUserTable->CookieString;
			$this->lblCookieString->Required = true;
			return $this->lblCookieString;
		}

		/**
		 * Create and setup QIntegerTextBox txtLastVisit
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtLastVisit_Create($strControlId = null) {
			$this->txtLastVisit = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtLastVisit->Name = QApplication::Translate('Last Visit');
			$this->txtLastVisit->Text = $this->objMantisUserTable->LastVisit;
			$this->txtLastVisit->Required = true;
			return $this->txtLastVisit;
		}

		/**
		 * Create and setup QLabel lblLastVisit
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblLastVisit_Create($strControlId = null, $strFormat = null) {
			$this->lblLastVisit = new QLabel($this->objParentObject, $strControlId);
			$this->lblLastVisit->Name = QApplication::Translate('Last Visit');
			$this->lblLastVisit->Text = $this->objMantisUserTable->LastVisit;
			$this->lblLastVisit->Required = true;
			$this->lblLastVisit->Format = $strFormat;
			return $this->lblLastVisit;
		}

		/**
		 * Create and setup QIntegerTextBox txtDateCreated
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtDateCreated_Create($strControlId = null) {
			$this->txtDateCreated = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtDateCreated->Name = QApplication::Translate('Date Created');
			$this->txtDateCreated->Text = $this->objMantisUserTable->DateCreated;
			$this->txtDateCreated->Required = true;
			return $this->txtDateCreated;
		}

		/**
		 * Create and setup QLabel lblDateCreated
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblDateCreated_Create($strControlId = null, $strFormat = null) {
			$this->lblDateCreated = new QLabel($this->objParentObject, $strControlId);
			$this->lblDateCreated->Name = QApplication::Translate('Date Created');
			$this->lblDateCreated->Text = $this->objMantisUserTable->DateCreated;
			$this->lblDateCreated->Required = true;
			$this->lblDateCreated->Format = $strFormat;
			return $this->lblDateCreated;
		}



		/**
		 * Refresh this MetaControl with Data from the local MantisUserTable object.
		 * @param boolean $blnReload reload MantisUserTable from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objMantisUserTable->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objMantisUserTable->Id;

			if ($this->txtUsername) $this->txtUsername->Text = $this->objMantisUserTable->Username;
			if ($this->lblUsername) $this->lblUsername->Text = $this->objMantisUserTable->Username;

			if ($this->txtRealname) $this->txtRealname->Text = $this->objMantisUserTable->Realname;
			if ($this->lblRealname) $this->lblRealname->Text = $this->objMantisUserTable->Realname;

			if ($this->txtEmail) $this->txtEmail->Text = $this->objMantisUserTable->Email;
			if ($this->lblEmail) $this->lblEmail->Text = $this->objMantisUserTable->Email;

			if ($this->txtPassword) $this->txtPassword->Text = $this->objMantisUserTable->Password;
			if ($this->lblPassword) $this->lblPassword->Text = $this->objMantisUserTable->Password;

			if ($this->txtEnabled) $this->txtEnabled->Text = $this->objMantisUserTable->Enabled;
			if ($this->lblEnabled) $this->lblEnabled->Text = $this->objMantisUserTable->Enabled;

			if ($this->txtProtected) $this->txtProtected->Text = $this->objMantisUserTable->Protected;
			if ($this->lblProtected) $this->lblProtected->Text = $this->objMantisUserTable->Protected;

			if ($this->txtAccessLevel) $this->txtAccessLevel->Text = $this->objMantisUserTable->AccessLevel;
			if ($this->lblAccessLevel) $this->lblAccessLevel->Text = $this->objMantisUserTable->AccessLevel;

			if ($this->txtLoginCount) $this->txtLoginCount->Text = $this->objMantisUserTable->LoginCount;
			if ($this->lblLoginCount) $this->lblLoginCount->Text = $this->objMantisUserTable->LoginCount;

			if ($this->txtLostPasswordRequestCount) $this->txtLostPasswordRequestCount->Text = $this->objMantisUserTable->LostPasswordRequestCount;
			if ($this->lblLostPasswordRequestCount) $this->lblLostPasswordRequestCount->Text = $this->objMantisUserTable->LostPasswordRequestCount;

			if ($this->txtFailedLoginCount) $this->txtFailedLoginCount->Text = $this->objMantisUserTable->FailedLoginCount;
			if ($this->lblFailedLoginCount) $this->lblFailedLoginCount->Text = $this->objMantisUserTable->FailedLoginCount;

			if ($this->txtCookieString) $this->txtCookieString->Text = $this->objMantisUserTable->CookieString;
			if ($this->lblCookieString) $this->lblCookieString->Text = $this->objMantisUserTable->CookieString;

			if ($this->txtLastVisit) $this->txtLastVisit->Text = $this->objMantisUserTable->LastVisit;
			if ($this->lblLastVisit) $this->lblLastVisit->Text = $this->objMantisUserTable->LastVisit;

			if ($this->txtDateCreated) $this->txtDateCreated->Text = $this->objMantisUserTable->DateCreated;
			if ($this->lblDateCreated) $this->lblDateCreated->Text = $this->objMantisUserTable->DateCreated;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC MANTISUSERTABLE OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's MantisUserTable instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveMantisUserTable() {
			try {
				// Update any fields for controls that have been created
				if ($this->txtUsername) $this->objMantisUserTable->Username = $this->txtUsername->Text;
				if ($this->txtRealname) $this->objMantisUserTable->Realname = $this->txtRealname->Text;
				if ($this->txtEmail) $this->objMantisUserTable->Email = $this->txtEmail->Text;
				if ($this->txtPassword) $this->objMantisUserTable->Password = $this->txtPassword->Text;
				if ($this->txtEnabled) $this->objMantisUserTable->Enabled = $this->txtEnabled->Text;
				if ($this->txtProtected) $this->objMantisUserTable->Protected = $this->txtProtected->Text;
				if ($this->txtAccessLevel) $this->objMantisUserTable->AccessLevel = $this->txtAccessLevel->Text;
				if ($this->txtLoginCount) $this->objMantisUserTable->LoginCount = $this->txtLoginCount->Text;
				if ($this->txtLostPasswordRequestCount) $this->objMantisUserTable->LostPasswordRequestCount = $this->txtLostPasswordRequestCount->Text;
				if ($this->txtFailedLoginCount) $this->objMantisUserTable->FailedLoginCount = $this->txtFailedLoginCount->Text;
				if ($this->txtCookieString) $this->objMantisUserTable->CookieString = $this->txtCookieString->Text;
				if ($this->txtLastVisit) $this->objMantisUserTable->LastVisit = $this->txtLastVisit->Text;
				if ($this->txtDateCreated) $this->objMantisUserTable->DateCreated = $this->txtDateCreated->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the MantisUserTable object
				$this->objMantisUserTable->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's MantisUserTable instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteMantisUserTable() {
			$this->objMantisUserTable->Delete();
		}



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'MantisUserTable': return $this->objMantisUserTable;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to MantisUserTable fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'UsernameControl':
					if (!$this->txtUsername) return $this->txtUsername_Create();
					return $this->txtUsername;
				case 'UsernameLabel':
					if (!$this->lblUsername) return $this->lblUsername_Create();
					return $this->lblUsername;
				case 'RealnameControl':
					if (!$this->txtRealname) return $this->txtRealname_Create();
					return $this->txtRealname;
				case 'RealnameLabel':
					if (!$this->lblRealname) return $this->lblRealname_Create();
					return $this->lblRealname;
				case 'EmailControl':
					if (!$this->txtEmail) return $this->txtEmail_Create();
					return $this->txtEmail;
				case 'EmailLabel':
					if (!$this->lblEmail) return $this->lblEmail_Create();
					return $this->lblEmail;
				case 'PasswordControl':
					if (!$this->txtPassword) return $this->txtPassword_Create();
					return $this->txtPassword;
				case 'PasswordLabel':
					if (!$this->lblPassword) return $this->lblPassword_Create();
					return $this->lblPassword;
				case 'EnabledControl':
					if (!$this->txtEnabled) return $this->txtEnabled_Create();
					return $this->txtEnabled;
				case 'EnabledLabel':
					if (!$this->lblEnabled) return $this->lblEnabled_Create();
					return $this->lblEnabled;
				case 'ProtectedControl':
					if (!$this->txtProtected) return $this->txtProtected_Create();
					return $this->txtProtected;
				case 'ProtectedLabel':
					if (!$this->lblProtected) return $this->lblProtected_Create();
					return $this->lblProtected;
				case 'AccessLevelControl':
					if (!$this->txtAccessLevel) return $this->txtAccessLevel_Create();
					return $this->txtAccessLevel;
				case 'AccessLevelLabel':
					if (!$this->lblAccessLevel) return $this->lblAccessLevel_Create();
					return $this->lblAccessLevel;
				case 'LoginCountControl':
					if (!$this->txtLoginCount) return $this->txtLoginCount_Create();
					return $this->txtLoginCount;
				case 'LoginCountLabel':
					if (!$this->lblLoginCount) return $this->lblLoginCount_Create();
					return $this->lblLoginCount;
				case 'LostPasswordRequestCountControl':
					if (!$this->txtLostPasswordRequestCount) return $this->txtLostPasswordRequestCount_Create();
					return $this->txtLostPasswordRequestCount;
				case 'LostPasswordRequestCountLabel':
					if (!$this->lblLostPasswordRequestCount) return $this->lblLostPasswordRequestCount_Create();
					return $this->lblLostPasswordRequestCount;
				case 'FailedLoginCountControl':
					if (!$this->txtFailedLoginCount) return $this->txtFailedLoginCount_Create();
					return $this->txtFailedLoginCount;
				case 'FailedLoginCountLabel':
					if (!$this->lblFailedLoginCount) return $this->lblFailedLoginCount_Create();
					return $this->lblFailedLoginCount;
				case 'CookieStringControl':
					if (!$this->txtCookieString) return $this->txtCookieString_Create();
					return $this->txtCookieString;
				case 'CookieStringLabel':
					if (!$this->lblCookieString) return $this->lblCookieString_Create();
					return $this->lblCookieString;
				case 'LastVisitControl':
					if (!$this->txtLastVisit) return $this->txtLastVisit_Create();
					return $this->txtLastVisit;
				case 'LastVisitLabel':
					if (!$this->lblLastVisit) return $this->lblLastVisit_Create();
					return $this->lblLastVisit;
				case 'DateCreatedControl':
					if (!$this->txtDateCreated) return $this->txtDateCreated_Create();
					return $this->txtDateCreated;
				case 'DateCreatedLabel':
					if (!$this->lblDateCreated) return $this->lblDateCreated_Create();
					return $this->lblDateCreated;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to MantisUserTable fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'UsernameControl':
						return ($this->txtUsername = QType::Cast($mixValue, 'QControl'));
					case 'RealnameControl':
						return ($this->txtRealname = QType::Cast($mixValue, 'QControl'));
					case 'EmailControl':
						return ($this->txtEmail = QType::Cast($mixValue, 'QControl'));
					case 'PasswordControl':
						return ($this->txtPassword = QType::Cast($mixValue, 'QControl'));
					case 'EnabledControl':
						return ($this->txtEnabled = QType::Cast($mixValue, 'QControl'));
					case 'ProtectedControl':
						return ($this->txtProtected = QType::Cast($mixValue, 'QControl'));
					case 'AccessLevelControl':
						return ($this->txtAccessLevel = QType::Cast($mixValue, 'QControl'));
					case 'LoginCountControl':
						return ($this->txtLoginCount = QType::Cast($mixValue, 'QControl'));
					case 'LostPasswordRequestCountControl':
						return ($this->txtLostPasswordRequestCount = QType::Cast($mixValue, 'QControl'));
					case 'FailedLoginCountControl':
						return ($this->txtFailedLoginCount = QType::Cast($mixValue, 'QControl'));
					case 'CookieStringControl':
						return ($this->txtCookieString = QType::Cast($mixValue, 'QControl'));
					case 'LastVisitControl':
						return ($this->txtLastVisit = QType::Cast($mixValue, 'QControl'));
					case 'DateCreatedControl':
						return ($this->txtDateCreated = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>